# -*- coding: utf-8 -*-
# -----------------------
# @Time ： 2021/6/23 5:32 下午
# @Author ： liyi03
# @File ：run_ios_app.py
# @IDE ：PyCharm
# -----------------------
import os

import pytest
from loguru import logger

from public.configer import base_path
from public.time_stamp import time_stamp

logger.add("./log/run.log", encoding="utf-8")
testcase_path = os.path.join(base_path, "testcase").replace("\\", '/')


def run_app():
    pytest.main(["-s", "{}".format(testcase_path), "--alluredir", "report"])
    # pytest.main(["-s", "{}/test_debug.py".format(testcase_path), "--alluredir", "report"]) # 运行指定模块下的用例，用于调式
    # os.system('allure generate report/ -o report/html{}'.format(time_stamp()))    # 调式模式下注释掉生成报告代码


if __name__ == '__main__':
    run_app()
